
set(CMAKE_CONFIGURATION_TYPES "@CMAKE_CONFIGURATION_TYPES@")
set(CMAKE_EXECUTABLE_SUFFIX "@CMAKE_EXECUTABLE_SUFFIX@")

set(app4test_source_dir "@APP4TEST_SOURCE_DIR@")
set(app4test_binary_dir "@APP4TEST_BINARY_DIR@")
set(app4test_build_type "@APP4TEST_BUILD_TYPE@")
set(app4test_cmake_generator "@APP4TEST_CMAKE_GENERATOR@")

# --------------------------------------------------------------------------
# Sanity checks

if(NOT EXISTS ${app4test_source_dir})
  message(FATAL_ERROR "Make sure variable APP4TEST_SOURCE_DIR is set to a valid directory. "
                      "APP4TEST_SOURCE_DIR [${app4test_source_dir}]")
endif()

if(${app4test_build_type} STREQUAL "")
  message(FATAL_ERROR "'app4test_build_type' shouldn't be empty !")
endif()

# --------------------------------------------------------------------------
# Set application variable

set(application_dir "${app4test_binary_dir}/bin")
if(CMAKE_CONFIGURATION_TYPES)
  set(application_dir ${application_dir}/${app4test_build_type})
endif()
set(application_name App4Test)

set(application ${application_dir}/${application_name}${CMAKE_EXECUTABLE_SUFFIX})
